#include<iostream>
using namespace std;
int main()
{
     int n=4;
     int &r = n;
     r=4;
     cout<<r<<endl;
     cout<<n<<endl;
     n=5;
     cout<<r<<endl;
     int & r2 =r;
     cout<<r2<<endl;
	return 0;
}